<?php
require ('config.php');
if(Bingz_config('Site_config_fwsz') == '1'){
	 $fwszts=$ubb->index_ubb(Bingz_config('Site_config_fwszts'));
   @include template('head');
   @include template('close');
   exit;
}
if($flmmc && $fwjmc){
  $file='source/'.$flmmc.'/'.$flmmc.'_'.$fwjmc.'.php';
  if(file_exists($file)){
     require_once $file;
  }else{
	   $flmmc = 'index';
     Bingz_Error_Reporting('Bingz:-2(404)','访问'); 
  }
}
if($flmmc == 'index'){
	  $fid=verify_id($_GET['index']);
if($indexbf=Bingz_cache_html('index','index_'.$fid.'')){
	  $index[]= array( 'value' => $indexbf );
}else{
	  $templatesml=$templates[$wappced];
    if($fid){
	     $design_sql=$db->query('index' ," `templates` ='$templatesml' AND `yc` ='0' AND `fid` = $fid ORDER BY `px` ASC ",'');
    }else{
	     $design_sql=$db->query('index' ," `templates` ='$templatesml' AND `yc` ='0' AND `fid` = '0' ORDER BY `px` ASC ",''); 
    }
    while($ro=mysql_fetch_array($design_sql)){
    	if(authcode($ro['value'],'DECODE')){
    		 $ro['value']=authcode($ro['value'],'DECODE');
    	}
	     if($ro[type]=='0'){
		     $syxsubb=Bingz_html($ro['value']);
	     }else if($ro[type]=='1'){
		     $syxsubb=$ubb->index_ubb($ro['value']);
	     }else if($ro[type]=='2'){
		     $syxsubb=$ro['value'];
	     }else if($ro[type]=='7'){
		     $syxsubb='<a href="index.php?index='.$ro['id'].'">'.$ro['value'].'</a>';		
	     }
       $index[]= array('value'=> $syxsubb );
       Bingz_cache_html_post('index','index_'.$fid.'',$cssa.$syxsubb.$syxshh.$cssb,'1');
       unset($syxsubb);
    }
    $db->free_result($design_sql);
}
   @include template('head');
   @include template('index');
   @include template('foot');
   unset($index);
   Bingz_huancunhtml('index',$time='1');
}
Bingz_statistics();
ob_end_flush();

//echo round(microtime(true)-$mmtime,3).'<br/>';
//echo '/'.sprintf("%.2f",(memory_get_usage()/1024));
?>
